﻿@using System.Data;
@model DTcms.Model.BaseModel
@{
    ViewBag.Title = "友情链接-" + Model.site.name;
}
@section HeaderContent{
    <link href="/template/pc/main/default/skin/dragcode.css" rel="stylesheet" />
}
<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="@Html.linkurl("index")">首页</a> &gt;
        <a href="@Html.linkurl("link")">友情链接</a>
    </div>
</div>
<!--/当前位置-->

<div class="section clearfix">
    <!--/页面右边-->
    <div class="right-260">
        <div class="bg-wrap nobg">
            <div class="sidebar-box">
                <h4>栏目导航</h4>
                <ul class="navbar">
                    @{
                        DataTable contentlist = Html.get_article_list("content", 0, 0, "status=0");
                        foreach (DataRow dr in contentlist.Rows)
                        {
                            <li>
                                <h5><a title="@dr["title"]" href="@Html.linkurl("content",dr["call_index"])">@dr["title"]</a></h5>
                            </li>
                        }
                    }
                    <li>
                        <h5><a href="@Html.linkurl("feedback")">留言反馈</a></h5>
                    </li>
                    <li>
                        <h5><a href="@Html.linkurl("link")">友情链接</a></h5>
                    </li>
                </ul>
            </div>

            <div class="sidebar-box">
                <h4>联系我们</h4>
                <ul class="txt-list">
                    <li>@Model.site.company</li>
                    <li>地址：@Model.site.address</li>
                    <li>电话：@Model.site.tel</li>
                    <li>E-mail：@Model.site.email</li>
                    <li>微信公众号：动力启航</li>
                </ul>
            </div>

        </div>
    </div>
    <!--/页面右边-->
    <!--页面左边-->
    <div class="left-auto">
        <div class="bg-wrap">
            <div class="meta">
                <h2>友情链接</h2>
            </div>

            <div class="link-box">
                <div class="side-link clearfix">
                    <ul class="img">
                        @{
                            DataTable imgList = Html.get_plugin_method("DTcms.Web.Plugin.Link", "link", "get_link_list", 0, "site_id=" + Model.site.id + " and is_image=1");
                            foreach (DataRow dr in imgList.Rows)
                            {
                                <li>
                                    <a target="_blank" href="@dr["site_url"]" title="@dr["title"]">
                                        <img src="@dr["img_url"]" />
                                    </a>
                                </li>
                            }
                        }
                    </ul>
                    <div class="txt">
                        @{
                            DataTable txtList = Html.get_plugin_method("DTcms.Web.Plugin.Link", "link", "get_link_list", 0, "site_id=" + Model.site.id + " and is_image=0");
                            foreach (DataRow dr in txtList.Rows)
                            {
                                <a target="_blank" href="@dr["site_url"]" title="@dr["title"]">@dr["title"]</a>
                                <strong>|</strong>
                            }
                        }
                    </div>
                </div>
                <h2 class="slide-tit">
                    <span>申请链接</span>
                </h2>
                <form id="link_form" name="link_form" url="/plugin/link/link_add?site=@Model.site.id">
                    <div class="form-box" style="margin:0 20px;">
                        <dl class="form-group">
                            <dt>网站名称：</dt>
                            <dd>
                                <input id="txtTitle" name="txtTitle" type="text" class="input" datatype="*" sucmsg=" " />
                                <span class="Validform_checktip">*需要申请友情链接的网站标题</span>
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>联 系 人：</dt>
                            <dd>
                                <input id="txtUserName" name="txtUserName" type="text" class="input" datatype="*" sucmsg=" " />
                                <span class="Validform_checktip">*该网站联系人的姓名</span>
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>联系电话：</dt>
                            <dd>
                                <input id="txtUserTel" name="txtUserTel" type="text" class="input" />
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>电子邮箱：</dt>
                            <dd>
                                <input id="txtEmail" name="txtEmail" type="text" class="input" />
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>链接网址：</dt>
                            <dd>
                                <input id="txtSiteUrl" name="txtSiteUrl" type="text" class="input" datatype="url" sucmsg=" " />
                                <span class="Validform_checktip">*申请友情链接的网址</span>
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>LOGO图片：</dt>
                            <dd>
                                <input id="txtImgUrl" name="txtImgUrl" type="text" class="input" />
                                <span class="Validform_checktip">网站链接的LOGO图片地址</span>
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dt>激&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;活：</dt>
                            <dd>
                                <input type="hidden" name="imgcodeid" id="imgcodeid" />
                                <div class="authcode2017 clearfix">
                                    <ul class="authcode_btn" id="authcode_btn">
                                        <li data-val="0">0</li>
                                        <li data-val="1">1</li>
                                        <li data-val="2">2</li>
                                        <li data-val="3">3</li>
                                        <li data-val="4">4</li>
                                        <li data-val="5">5</li>
                                        <li data-val="6">6</li>
                                        <li data-val="7">7</li>
                                        <li data-val="8">8</li>
                                        <li data-val="9">9</li>
                                        <div class="success"><s class="s"></s>激活成功</div>
                                    </ul>
                                    <span class="authcode_txt">请点击图中“<span id="authcode_txt"></span>”以激活</span>
                                    <input name="codeindex" id="codeindex" type="hidden" datatype="code" nullmsg="请点击对应字符激活后提交！" sucmsg=" " />
                                    <span class="Validform_checktip"></span>
                                </div>
                            </dd>
                        </dl>
                        <dl class="form-group">
                            <dd>
                                <input id="btnSubmit" name="btnSubmit" type="submit" value="提交申请" class="submit" />
                            </dd>
                        </dl>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--/页面左边-->
</div>
@section Scripts{
    <script type="text/javascript" src="/template/pc/main/default/js/dragcode2.js"></script>
    <script type="text/javascript">
        layui.use(['validform', 'jqueryform'], function () {
            var main = layui.myaspx;
            $('#imgcodeid').iAuthcode();
            $("#link_form").initValidform('#btnSubmit', 1);
        });
    </script>
}